<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>哈哈，我是标题</title>
    <script>
        function doBgColor(){
            document.bgColor="red";//严格区分大小写的，设置背景颜色
        }
        function doTitle(){
            // console.log(document.title);//获取标题
            document.title="大家好,我是王子伟，我明天要出去hi";//设置标题
        }
        function doBody(){
            console.log(document.body);//body的DOM对象
        }
        function doWrite(){
            document.write("嘻嘻");
        }

     
    </script>
</head>
<body>
    <input type="button" value="设置背景" onclick="doBgColor()">
    <input type="button" value="设置网页标题" onclick="doTitle()">
    <input type="button" value="获取body" onclick="doBody()">
    <input type="button" value="write" onclick="doWrite()">
</body>
</html>